package com.jy.rhin.model.body.siwangyxzm;


import com.jy.rhin.infra.cda.EDataElement;
import com.jy.rhin.infra.cda.XPath;
import com.jy.rhin.infra.cda.XValid;
import com.jy.rhin.model.ClinicalDocumentData;
import com.jy.rhin.model.CodeObject;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

//死亡医学证明
@Getter
@Setter
public class SiWangYXZM extends ClinicalDocumentData {

    @XPath(path = "/participant")
    JiaRen participant;

    //死亡日期
    @XPath(path = "/component/structuredBody/component/section/entry/observation/code[@code='DE02.01.036.00']/../value/@value")
    private String siWangRQ;

    //死亡地点类别
    @XPath(path = "/component/structuredBody/component/section/entry/observation/code[@code='DE02.01.034.00']/../value",
            xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_034_00))
    private CodeObject siWangDD;

    //死亡医院名称
    @XPath(path = "/component/structuredBody/component/section/entry/observation/code[@code='DE08.10.013.00']/../value/text()",
            xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE08_10_013_00))
    private String siWangDDMC;

    //死亡原因条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='29548-5'][@codeSystem='2.16.840.1.113883.6.1']"
            , listItemPath = "/entry/observation/code[@code='DE05.01.061.00']"
            , listItemBackLevel = 3)
    private List<SiWangYY> siWangYYList;

    //发病到死亡时长条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='29548-5'][@codeSystem='2.16.840.1.113883.6.1']/.."
            , listItemPath = "/entry/observation/code[@code='DE06.00.023.00']"
            , listItemBackLevel = 4)
    private List<Integer> faBingSWSJ;

    //其他疾病诊断条目
    @XPath(path = "/component/structuredBody/component/section/code[@code='29548-5'][@codeSystem='2.16.840.1.113883.6.1']/.."
            , listItemPath = "/entry/observation/code[@code='DE05.01.032.00']"
            , listItemBackLevel = 3)
    private List<CodeObject> qiTaJBZDList;

    //最高诊断机构级别代码
    @XPath(path = "/component/structuredBody/component/section/entry/observation/code[@code='DE08.10.049.00']/../value/@code")
    private String zuiGaoZDDWDM;

    //最高诊断单位名称
    @XPath(path = "/component/structuredBody/component/section/entry/observation/code[@code='DE08.10.049.00']/../value/@displayName")
    private String zuiGaoZDDWMC;

    //最高诊断依据
    @XPath(path = "/component/structuredBody/component/section/entry/observation/code[@code='DE05.01.043.00']/../value",
            xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE05_01_043_00))
    private CodeObject zuiGaoZDYJ;
 
    //死亡根本原因
    @XPath(path = "/component/structuredBody/component/section/entry/observation/code[@code='DE05.01.021.00']/../value",
            xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE05_01_021_00))
    private CodeObject genBenSY;
}
